1. Field of the Invention
The present invention relates to an information processing apparatus, method and computer program.
2. Description of the Related Art
In a conventional information processing apparatus such as a digital camera or printer, a specific object is detected in input image data and the detected object is subjected to the appropriate processing. Face detection is an example of processing for detecting a specific object. A variety of methods for carrying out face detection have been proposed. One of these is described in P. Viola and M. Jones, “Robust Real-time Object Detection”, SECOND INTERNATIONAL WORKSHOP ON STATISTICAL AND COMPUTATIONAL THEORIES OF VISION”, Jul. 13, 2001. The method is referred to as the “Viola and Jones Method”. An overview of the Viola and Jones Method will be described with reference to FIG. 6. According to the Viola and Jones Method, input image data 600 is subjected to multiple stages of verification. Here it is assumed that three stages of verification, namely verification A (610), verification B (611) and verification C (612), are carried out. At each stage of verification, a judgment is made as to whether the image data 600 is that of a face or non-face. Image data 600 that has been determined to be “false” at any stage of verification is judged to be that of a non-face and is not subjected to any further processing. On the other hand, image data 600 that has been determined to be “true” at all stages of verification is judged to be that of a face. Each stage of verification is conducted using dictionary data. Dictionary data is a parameter such as a feature amount necessary for verification or a threshold value used as a criterion for the true-or-false determination. For example, in a case where the image data 600 is that of a face and a small rectangle in the region of both eyes is compared with a small rectangle below the eye region, the fact that the former is darker is a feature. Accordingly, values for designating both rectangular regions and a threshold value for comparison with the difference between the brightnesses are given as dictionary data.
When face detection is performed using the Viola and Jones Method, it is desired that the processing be executed at high speed. Recent models of information processing apparatus generally include a high-speed, high-cost primary storage device and a low-speed, low-cost secondary storage device. If all of the dictionary data used in verification is retained in the primary storage device, face detection can be performed at very high speed. However, in a cost-sensitive information processing apparatus such as a digital camera, it is desired that the storage capacity of the primary storage device be reduced in order to implement face detection at low cost. To achieve this, use is made of a method in which dictionary data being held in the secondary storage device is read out to the primary storage device when necessary. When processing is executed using reference data successively at such time, the general practice is to perform a prefetch operation in which reference data scheduled for use at the next stage of processing is read out to the primary storage device in advance. Using prefetch makes it possible to speed up verification while reducing the size of the primary storage device. For example, the overall processing speed for face detection can be raised by prefetching the dictionary data C (622) to the primary storage device before verification B (611) ends.
In face detection, however, dictionary data scheduled for use at the next stage of processing in the manner described above changes depending upon the result of verification. For example, assume that prefetch of dictionary data C (622) starts before verification B (611) ends. If the result of verification B (611) is “false” in such case, then face detection applied to this image data ends and processing of the following data begins. Since the dictionary data necessary for the next verification stage is the dictionary data A (620), the time is takes for read-out of the dictionary data C (622) to be completed is wasted in a case where prefetch of the dictionary data C (622) cannot be ended forcibly. Further, even in a case where prefetch can be ended forcibly, there are also instances where other dictionary data being held in the primary storage device is overwritten by the dictionary data C (622). In other words, in a case where prefetch is always carried out, the greater the number of times the result of verification is “false”, the greater the number of times wasteful read-out of dictionary data is performed and the greater the number of re-loads of dictionary data that has been overwritten because of wasteful read-out of dictionary data. An aspect of the present invention provides information processing technology for speeding up processing while reducing the size of the primary storage device. Another aspect of the present invention reduces wasteful prefetch and shortens waiting time due to parameter loading.